[REFERENCE RMD FILE: https://cdn.rawgit.com/OHI-Science/ohiprep/master/globalprep/np/v2017/targetharvest_dataprep.html]
This analysis converts FAO capture production data into the OHI 2018 targeted harvest pressure data.
One more year of data
The species2group.csv file was udated: South America Sea Lion is not a cetacean therefore was assigned the pinniped order and excluded from the target list.
http://www.fao.org/fishery/statistics/software/fishstatj/en#downlApp
Release date: March 2018
FAO Global Capture Production Quantity 1950_2016
Downloaded: Aug 1 2018
Description: Quantity (tonnes) of fisheries capture for each county, species, year.
Time range: 1950-2016
# load libraries, set directories
library(ohicore) #devtools::install_github('ohi-science/ohicore@dev')
library(dplyr)##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(stringr)
library(tidyr)
library(ggplot2)
library(plotly)##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
## comment out when knitting
#setwd("globalprep/prs_targetedharvest/v2018")
### Load FAO-specific user-defined functions
source('../../../src/R/fao_fxn.R') # function for cleaning FAO files
source('../../../src/R/common.R') # directory locationsThis includes the FAO capture production data and a list of the “target” species.
## FAO capture production data
fis_fao_csv <- read.csv(file.path(dir_M, 'git-annex/globalprep/_raw_data/FAO_capture/d2018/Global_capture_production_Quantity_1950-2016.csv'))
# species list
sp2grp <- read.csv('raw/species2group.csv') %>%
dplyr::filter(incl_excl == 'include') %>%
dplyr::select(target, species); head(sp2grp)## target species
## 1 cetacean Atlantic spotted dolphin
## 2 cetacean Atlantic white-sided dolphin
## 3 cetacean Australian snubfin dolphin
## 4 cetacean Baird's beaked whale
## 5 cetacean Baleen whales nei
## 6 cetacean Beaked whales nei
m <- fis_fao_csv %>%
dplyr::rename(country = Country..Country.,
species = Species..ASFIS.species.,
area = Fishing.area..FAO.major.fishing.area.,
Unit = Unit..Unit.) %>%
dplyr::select(-Unit)
m <- m %>%
tidyr::gather("year", "value", -(1:3)) %>%
dplyr::mutate(year = gsub("X", "", year)) %>%
fao_clean_data() ## Warning: attributes are not identical across measure variables;
## they will be dropped
m <- m %>%
dplyr::mutate(species = as.character(species)) %>%
dplyr::mutate(species = ifelse(stringr::str_detect(species, "Henslow.*s swimming crab"), "Henslow's swimming crab", species))This analysis only includes target species. The warning messages need to be checked and, if necessary, changes should be made to the raw/species2group.csv
# check for discrepancies in species list
## seals are no longer included (so these errors can be ignored):
spgroups <- sort(as.character(unique(m$species)))
groups <- c('turtle', 'seal', 'whale', 'sea lion', 'dolphin', 'porpoise')
for (group in groups) { #group='dolphin'
possibles <- spgroups[grep(group, spgroups)]
d_missing_l <- setdiff(possibles, sp2grp$species)
if (length(d_missing_l)>0){
cat(sprintf("\nMISSING in the lookup the following species in target='%s'.\n %s\n",
group, paste(d_missing_l, collapse='\n ')))
}
}##
## MISSING in the lookup the following species in target='turtle'.
## Chinese softshell turtle
## River and lake turtles nei
##
## MISSING in the lookup the following species in target='seal'.
## Baikal seal
## Bearded seal
## Caspian seal
## Grey seal
## Harbour seal
## Harp seal
## Hooded seal
## Larga seal
## Leopard seal
## New Zealand fur seal
## Northern fur seal
## Ribbon seal
## Ringed seal
## South African fur seal
## South American fur seal
## Southern elephant seal
##
## MISSING in the lookup the following species in target='whale'.
## Velvet whalefish
##
## MISSING in the lookup the following species in target='sea lion'.
## New Zealand sea lion
## Seals and sea lions nei
## South American sea lion
## Steller sea lion
##
## MISSING in the lookup the following species in target='dolphin'.
## Common dolphinfish
# check for species in lookup not found in data
l_missing_d <- setdiff(sp2grp$species, spgroups)
if (length(l_missing_d)>0){
cat(sprintf('\nMISSING: These species in the lookup are not found in the FAO data \n'))
print(l_missing_d)
}
## filter data to include only target species ----
m2 <- m %>%
dplyr::filter(species %in% sp2grp$species)
unique(m2$area) # confirm these are all marine## [1] Marine areas outside the Antarctic Antarctic areas nei
## [3] Atlantic, Western Central Atlantic, Eastern Central
## [5] Atlantic, Southwest Pacific, Northwest
## [7] Mediterranean and Black Sea Pacific, Southeast
## [9] Pacific, Western Central Atlantic, Northeast
## [11] Atlantic, Northwest Pacific, Eastern Central
## [13] Indian Ocean, Eastern Indian Ocean, Western
## [15] Pacific, Southwest Pacific, Northeast
## 29 Levels: Africa - Inland waters ... Pacific, Western Central
# spread wide to expand years
m_w = m2 %>%
tidyr::spread(year, value) %>%
dplyr::left_join(sp2grp, by='species'); head(m_w)## Warning: Column `species` joining character vector and factor, coercing
## into character vector
## country species area 1950
## 1 Argentina Baleen whales nei Marine areas outside the Antarctic NA
## 2 Argentina Blue whale Antarctic areas nei 7
## 3 Argentina Bottlenose dolphin Marine areas outside the Antarctic NA
## 4 Argentina Burmeister's porpoise Marine areas outside the Antarctic NA
## 5 Argentina Commerson's dolphin Marine areas outside the Antarctic NA
## 6 Argentina Common dolphin Marine areas outside the Antarctic NA
## 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964
## 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 2 19 2 2 9 4 2 1 1 1 6 0 0 0 0
## 3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978
## 1 NA NA NA NA NA 0 0 0 0 0 0 0 0 0
## 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 3 NA NA NA NA NA 0 0 0 0 0 0 0 0 0
## 4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA 0 0 0 0 0 0 0 0 0
## 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992
## 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA NA NA NA NA
## 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
## 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0
## 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0
## 4 NA NA NA NA NA 0 0 0 0 0 0 0 0 1
## 5 NA NA NA NA NA 0 12 212 37 40 16 12 24 14
## 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 target
## 1 0 0 0 0 0 0 0 0 0 0 cetacean
## 2 0 0 0 0 0 0 0 0 0 0 cetacean
## 3 0 0 0 0 0 0 0 0 0 0 cetacean
## 4 0 0 0 0 5 0 0 0 0 0 cetacean
## 5 0 0 21 21 11 0 0 0 0 0 cetacean
## 6 1 0 0 0 1 0 0 0 0 0 cetacean
# gather long by target
m_l = m_w %>%
dplyr::select(-area) %>%
tidyr::gather(year, value, -country, -species, -target, na.rm=T) %>%
dplyr::mutate(year = as.integer(as.character(year))) %>%
dplyr::arrange(country, target, year); head(m_l)## country species target year value
## 1 Argentina Blue whale cetacean 1950 7
## 2 Argentina Fin whale cetacean 1950 503
## 3 Argentina Humpback whale cetacean 1950 12
## 4 Argentina Minke whale cetacean 1950 0
## 5 Argentina Sei whale cetacean 1950 372
## 6 Argentina Sperm whale cetacean 1950 52
#Temporary note: data for Gabn goes oly to 2009
# explore Japan[210]
m_l %>%
dplyr::group_by(country, target, year) %>%
dplyr::summarize(value = sum(value)) %>%
dplyr::filter(country == 'Japan', target == 'cetacean', year >= 2000) ## # A tibble: 17 x 4
## # Groups: country, target [1]
## country target year value
## <fct> <fct> <int> <dbl>
## 1 Japan cetacean 2000 19396
## 2 Japan cetacean 2001 19072
## 3 Japan cetacean 2002 19268
## 4 Japan cetacean 2003 17955
## 5 Japan cetacean 2004 16736
## 6 Japan cetacean 2005 17083
## 7 Japan cetacean 2006 15374
## 8 Japan cetacean 2007 14173
## 9 Japan cetacean 2008 10161
## 10 Japan cetacean 2009 12357
## 11 Japan cetacean 2010 7543
## 12 Japan cetacean 2011 3890
## 13 Japan cetacean 2012 2653
## 14 Japan cetacean 2013 3301
## 15 Japan cetacean 2014 3572
## 16 Japan cetacean 2015 3033
## 17 Japan cetacean 2016 2959
# summarize totals per region per year
m_sum = m_l %>%
dplyr::group_by(country, year) %>%
dplyr::summarize(value = sum(value, na.rm=TRUE)) %>%
dplyr::filter(value != 0) %>%
dplyr::ungroup(); head(m_sum) ## # A tibble: 6 x 3
## country year value
## <fct> <int> <dbl>
## 1 Argentina 1950 946
## 2 Argentina 1951 796
## 3 Argentina 1952 798
## 4 Argentina 1953 678
## 5 Argentina 1954 1083
## 6 Argentina 1955 947
m_sum <- m_sum %>%
dplyr::mutate(country = as.character(country)) %>%
dplyr::mutate(country = ifelse(stringr::str_detect(country, "C.*te d'Ivoire"), "Ivory Coast", country))
### Function to convert to OHI region ID
m_sum_rgn <- name_2_rgn(df_in = m_sum,
fld_name='country',
flds_unique=c('year'))##
## These data were removed for not having any match in the lookup tables:
##
## Other nei
## 1
##
## These data were removed for not being of the proper rgn_type (eez,ohi_region) or mismatching region names in the lookup tables:
## < table of extent 0 x 0 >
##
## DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress).
## # A tibble: 2 x 1
## country
## <chr>
## 1 Guadeloupe
## 2 Martinique
# these are duplicates for the same region
dplyr::filter(m_sum_rgn, country %in% c("Guadeloupe", "Martinique"))## # A tibble: 57 x 5
## country year value rgn_id rgn_name
## <chr> <int> <dbl> <int> <chr>
## 1 Guadeloupe 1970 0.1 140 Guadeloupe and Martinique
## 2 Guadeloupe 1971 0.1 140 Guadeloupe and Martinique
## 3 Guadeloupe 1972 0.1 140 Guadeloupe and Martinique
## 4 Guadeloupe 1973 0.1 140 Guadeloupe and Martinique
## 5 Guadeloupe 1974 0.1 140 Guadeloupe and Martinique
## 6 Guadeloupe 1975 0.1 140 Guadeloupe and Martinique
## 7 Guadeloupe 1976 0.1 140 Guadeloupe and Martinique
## 8 Guadeloupe 1977 20 140 Guadeloupe and Martinique
## 9 Guadeloupe 1978 20 140 Guadeloupe and Martinique
## 10 Guadeloupe 1979 10 140 Guadeloupe and Martinique
## # ... with 47 more rows
# They will be summed:
m_sum_rgn <- m_sum_rgn %>%
dplyr::group_by(rgn_id, rgn_name, year) %>%
dplyr::summarize(value = sum(value)) %>%
dplyr::ungroup()Data is rescaled by dividing by the 95th quantile of values across all regions from 2011 to 2014.
target_harvest <- m_sum_rgn %>%
dplyr::mutate(quant_95 = quantile(value[year %in% 2011:2016], 0.95, na.rm = TRUE)) %>%
dplyr::mutate(score = value / quant_95) %>%
dplyr::mutate(score = ifelse(score>1, 1, score)) %>%
dplyr::select(rgn_id, year, pressure_score = score) %>%
dplyr::arrange(rgn_id, year); head(target_harvest); summary(target_harvest)## # A tibble: 6 x 3
## rgn_id year pressure_score
## <int> <int> <dbl>
## 1 7 1984 0.0000294
## 2 7 1985 0.0000294
## 3 7 1986 0.0000294
## 4 7 1987 0.0000294
## 5 7 1988 0.0000294
## 6 7 1989 0.0000294
## rgn_id year pressure_score
## Min. : 7.0 Min. :1950 Min. :0.0000294
## 1st Qu.:104.0 1st Qu.:1970 1st Qu.:0.0017647
## Median :141.0 Median :1984 Median :0.0307353
## Mean :136.3 Mean :1984 Mean :0.2068458
## 3rd Qu.:180.0 3rd Qu.:1998 3rd Qu.:0.2540441
## Max. :231.0 Max. :2016 Max. :1.0000000
#quant_95= 160761
# any regions that did not have a catch should have score = 0
rgns <- rgn_master %>%
dplyr::filter(rgn_typ == "eez") %>%
dplyr::select(rgn_id = rgn_id_2013) %>%
dplyr::filter(rgn_id < 255) %>%
base::unique() %>%
dplyr::arrange(rgn_id)
rgns <- expand.grid(rgn_id = rgns$rgn_id, year = min(target_harvest$year):max(target_harvest$year))
target_harvest <- rgns %>%
dplyr::left_join(target_harvest) %>%
dplyr::mutate(pressure_score = ifelse(is.na(pressure_score), 0, pressure_score)) %>%
dplyr::arrange(rgn_id); head(target_harvest); summary(target_harvest)## Joining, by = c("rgn_id", "year")
## rgn_id year pressure_score
## 1 1 1950 0
## 2 1 1951 0
## 3 1 1952 0
## 4 1 1953 0
## 5 1 1954 0
## 6 1 1955 0
## rgn_id year pressure_score
## Min. : 1.0 Min. :1950 Min. :0.00000
## 1st Qu.: 59.0 1st Qu.:1966 1st Qu.:0.00000
## Median :117.0 Median :1983 Median :0.00000
## Mean :118.1 Mean :1983 Mean :0.03003
## 3rd Qu.:177.0 3rd Qu.:2000 3rd Qu.:0.00000
## Max. :250.0 Max. :2016 Max. :1.00000
write.csv(target_harvest, 'output/fao_targeted.csv', row.names = FALSE)
target_harvest_gf <- target_harvest %>%
dplyr::mutate(gapfill = 0) %>%
dplyr::select(rgn_id, year, gapfill)
write.csv(target_harvest_gf, 'output/fao_targeted_gf.csv', row.names = FALSE)The data from last year and this year should be the same unless there were changes to underlying FAO data or the master species list.
In this case, all of the regions looked very similar.
new <- read.csv("output/fao_targeted.csv") %>%
filter(year==2015)
old <- read.csv("../v2017/output/fao_targeted.csv") %>%
#mutate(year== year-2) %>%
dplyr::filter(year == 2015) %>%
dplyr::select(rgn_id, year, pressure_score_old=pressure_score) %>%
dplyr::left_join(new, by=c("rgn_id", "year"))
old## rgn_id year pressure_score_old pressure_score
## 1 1 2015 0.0000000000 0.0000000000
## 2 2 2015 0.0000000000 0.0000000000
## 3 3 2015 0.0000000000 0.0000000000
## 4 4 2015 0.0000000000 0.0000000000
## 5 5 2015 0.0000000000 0.0000000000
## 6 6 2015 0.0000000000 0.0000000000
## 7 7 2015 0.0000000000 0.0000000000
## 8 8 2015 0.0000000000 0.0000000000
## 9 9 2015 0.0000000000 0.0000000000
## 10 10 2015 0.0000000000 0.0000000000
## 11 11 2015 0.0000000000 0.0000000000
## 12 12 2015 0.0000000000 0.0000000000
## 13 13 2015 0.0000000000 0.0000000000
## 14 14 2015 0.0000000000 0.0000000000
## 15 15 2015 0.0000000000 0.0000000000
## 16 16 2015 0.0171040676 0.0188235294
## 17 17 2015 0.0000000000 0.0000000000
## 18 18 2015 0.0000000000 0.0000000000
## 19 19 2015 0.0000000000 0.0000000000
## 20 20 2015 0.3610561762 0.3973529412
## 21 21 2015 0.0000000000 0.0000000000
## 22 24 2015 0.0000000000 0.0000000000
## 23 25 2015 0.0000000000 0.0000000000
## 24 26 2015 0.0000000000 0.0000000000
## 25 28 2015 0.0000000000 0.0000000000
## 26 29 2015 0.0000000000 0.0000000000
## 27 30 2015 0.0000000000 0.0000000000
## 28 31 2015 0.0000000000 0.0000000000
## 29 32 2015 0.0000000000 0.0000000000
## 30 33 2015 0.0000000000 0.0000000000
## 31 34 2015 0.0000000000 0.0000000000
## 32 35 2015 0.0000000000 0.0000000000
## 33 36 2015 0.0000000000 0.0000000000
## 34 37 2015 0.0000000000 0.0000000000
## 35 38 2015 0.0000000000 0.0000000000
## 36 39 2015 0.0000000000 0.0000000000
## 37 40 2015 0.0000000000 0.0000000000
## 38 41 2015 0.0000000000 0.0000000000
## 39 42 2015 0.0000000000 0.0000000000
## 40 43 2015 0.0000000000 0.0000000000
## 41 44 2015 0.0000000000 0.0000000000
## 42 45 2015 0.0000000000 0.0000000000
## 43 46 2015 0.0000000000 0.0000000000
## 44 47 2015 0.0000000000 0.0000000000
## 45 48 2015 0.0000000000 0.0000000000
## 46 49 2015 0.0000000000 0.0000000000
## 47 50 2015 0.0000000000 0.0000000000
## 48 51 2015 0.0000000000 0.0000000000
## 49 52 2015 0.0000000000 0.0000000000
## 50 53 2015 0.0000000000 0.0000000000
## 51 54 2015 0.0000000000 0.0000000000
## 52 55 2015 0.0000000000 0.0000000000
## 53 56 2015 0.0000000000 0.0000000000
## 54 57 2015 0.0000000000 0.0000000000
## 55 58 2015 0.0000000000 0.0000000000
## 56 59 2015 0.0000000000 0.0000000000
## 57 60 2015 0.0000000000 0.0000000000
## 58 61 2015 0.0000000000 0.0000000000
## 59 62 2015 0.0000000000 0.0000000000
## 60 63 2015 0.0000000000 0.0000000000
## 61 64 2015 0.0000000000 0.0000000000
## 62 65 2015 0.0000000000 0.0000000000
## 63 66 2015 0.0000000000 0.0000000000
## 64 67 2015 0.0000000000 0.0000000000
## 65 68 2015 0.0000000000 0.0000000000
## 66 69 2015 0.0000000000 0.0000000000
## 67 70 2015 0.0000000000 0.0000000000
## 68 71 2015 0.0000000000 0.0000000000
## 69 72 2015 0.0000000000 0.0000000000
## 70 73 2015 0.0416911647 0.3314705882
## 71 74 2015 0.0000000000 0.0000000000
## 72 75 2015 0.0000000000 0.0000000000
## 73 76 2015 0.0000000000 0.0000000000
## 74 77 2015 0.0000000000 0.0000000000
## 75 78 2015 0.0000000000 0.0000000000
## 76 79 2015 0.0000000000 0.0000000000
## 77 80 2015 0.0000000000 0.0000000000
## 78 81 2015 0.0000000000 0.0000000000
## 79 82 2015 0.0000000000 0.0000000000
## 80 84 2015 0.0000000000 0.0000000000
## 81 85 2015 0.0000000000 0.0000000000
## 82 86 2015 0.0000000000 0.0000000000
## 83 88 2015 0.0000000000 0.0000000000
## 84 89 2015 0.0000000000 0.0000000000
## 85 90 2015 0.0000000000 0.0000000000
## 86 91 2015 0.0000000000 0.0000000000
## 87 92 2015 0.0000000000 0.0000000000
## 88 93 2015 0.0000000000 0.0000000000
## 89 94 2015 0.0000000000 0.0000000000
## 90 95 2015 0.0000000000 0.0000000000
## 91 96 2015 0.0000000000 0.0000000000
## 92 97 2015 0.0000000000 0.0000000000
## 93 98 2015 0.0000000000 0.0000000000
## 94 99 2015 0.0000000000 0.0000000000
## 95 100 2015 0.0000000000 0.0000000000
## 96 101 2015 0.0000000000 0.0000000000
## 97 102 2015 0.0000000000 0.0000000000
## 98 103 2015 0.0000000000 0.0000000000
## 99 104 2015 0.0000000000 0.0000000000
## 100 105 2015 0.0000000000 0.0000000000
## 101 106 2015 0.0000000000 0.0000000000
## 102 107 2015 0.0000000000 0.0000000000
## 103 108 2015 0.0000000000 0.0000000000
## 104 110 2015 0.0000000000 0.0000000000
## 105 111 2015 0.0000000000 0.0000000000
## 106 112 2015 0.0000000000 0.0000000000
## 107 113 2015 0.0000000000 0.0000000000
## 108 114 2015 0.0000000000 0.0000000000
## 109 115 2015 0.0000000000 0.0000000000
## 110 116 2015 0.0000000000 0.0000000000
## 111 117 2015 0.0000000000 0.0000000000
## 112 118 2015 0.0000000000 0.0000000000
## 113 119 2015 0.0000000000 0.0000000000
## 114 120 2015 0.0000000000 0.0000000000
## 115 121 2015 0.0000000000 0.0000000000
## 116 122 2015 0.0000000000 0.0000000000
## 117 123 2015 0.0000000000 0.0000000000
## 118 124 2015 0.0000000000 0.0000000000
## 119 125 2015 0.0005345021 0.0005882353
## 120 126 2015 0.0000000000 0.0000000000
## 121 127 2015 0.0000000000 0.0000000000
## 122 129 2015 0.0000000000 0.0000000000
## 123 130 2015 0.0000000000 0.0000000000
## 124 131 2015 0.0000000000 0.0000000000
## 125 132 2015 0.0000000000 0.0000000000
## 126 133 2015 0.0000000000 0.0000000000
## 127 134 2015 0.0000000000 0.0000000000
## 128 135 2015 0.0000000000 0.0000000000
## 129 136 2015 0.0000000000 0.0000000000
## 130 137 2015 0.0000000000 0.0000000000
## 131 138 2015 0.0000000000 0.0000000000
## 132 139 2015 0.0000000000 0.0000000000
## 133 140 2015 0.0000000000 0.0000000000
## 134 141 2015 0.0000000000 0.0000000000
## 135 143 2015 0.0491741942 0.0541176471
## 136 144 2015 0.0000000000 0.0000000000
## 137 145 2015 0.7520444706 0.9232352941
## 138 146 2015 0.0000000000 0.0000000000
## 139 147 2015 0.0000000000 0.0000000000
## 140 148 2015 0.0000000000 0.0000000000
## 141 149 2015 0.0000000000 0.0000000000
## 142 150 2015 0.0000000000 0.0000000000
## 143 151 2015 0.0000000000 0.0000000000
## 144 152 2015 0.0000000000 0.0000000000
## 145 153 2015 0.0000000000 0.0000000000
## 146 154 2015 0.0000000000 0.0000000000
## 147 155 2015 0.0000000000 0.0000000000
## 148 156 2015 0.0000000000 0.0000000000
## 149 157 2015 0.0000000000 0.0000000000
## 150 158 2015 0.0000000000 0.0000000000
## 151 159 2015 0.0000000000 0.0000000000
## 152 161 2015 0.0000000000 0.0000000000
## 153 162 2015 0.0138970549 0.0152941176
## 154 163 2015 0.0000000000 0.1108823529
## 155 164 2015 0.0000000000 0.0000000000
## 156 166 2015 0.0000000000 0.0000000000
## 157 167 2015 0.0000000000 0.0000000000
## 158 168 2015 0.0000000000 0.0000000000
## 159 169 2015 0.0000000000 0.0000000000
## 160 171 2015 0.0000000000 0.0000000000
## 161 172 2015 0.0000000000 0.0000000000
## 162 173 2015 0.0000000000 0.0000000000
## 163 174 2015 0.0000000000 0.0000000000
## 164 175 2015 0.0000000000 0.0000000000
## 165 176 2015 0.0000000000 0.0000000000
## 166 177 2015 0.0002672511 0.0002941176
## 167 178 2015 0.0000000000 0.0000000000
## 168 179 2015 0.0002672511 0.0002941176
## 169 180 2015 0.0058795232 0.0064705882
## 170 181 2015 0.0000000000 0.0000000000
## 171 182 2015 0.0016035063 0.0017647059
## 172 183 2015 0.0000000000 0.0000000000
## 173 184 2015 0.0000000000 0.0000000000
## 174 185 2015 0.0000000000 0.0000000000
## 175 186 2015 0.0000000000 0.0000000000
## 176 187 2015 0.0008017532 0.0008823529
## 177 188 2015 0.0000000000 0.0000000000
## 178 189 2015 0.0000000000 0.0000000000
## 179 190 2015 0.0000000000 0.0000000000
## 180 191 2015 0.0000000000 0.0000000000
## 181 192 2015 0.0000000000 0.0000000000
## 182 193 2015 0.0000000000 0.0000000000
## 183 194 2015 0.0000000000 0.0000000000
## 184 195 2015 0.0000000000 0.0000000000
## 185 196 2015 0.0000000000 0.0000000000
## 186 197 2015 0.0000000000 0.0000000000
## 187 198 2015 0.0000000000 0.0000000000
## 188 199 2015 0.0000000000 0.0000000000
## 189 200 2015 0.0000000000 0.0000000000
## 190 202 2015 0.0000000000 0.0000000000
## 191 203 2015 0.0000000000 0.0000000000
## 192 204 2015 0.0000000000 0.0000000000
## 193 205 2015 0.0000000000 0.0000000000
## 194 206 2015 0.0000000000 0.0000000000
## 195 207 2015 0.0000000000 0.0000000000
## 196 208 2015 0.0000000000 0.0000000000
## 197 209 2015 0.0000000000 0.0000000000
## 198 210 2015 0.8284782725 0.8920588235
## 199 212 2015 0.0000000000 0.0000000000
## 200 213 2015 0.0000000000 0.0000000000
## 201 214 2015 0.0000000000 0.0000000000
## 202 215 2015 0.0000000000 0.0000000000
## 203 216 2015 0.0106900422 0.0526470588
## 204 218 2015 0.0000000000 0.0000000000
## 205 219 2015 0.0000000000 0.0000000000
## 206 220 2015 0.0000000000 0.0000000000
## 207 221 2015 0.0000000000 0.0000000000
## 208 222 2015 0.0000000000 0.0000000000
## 209 223 2015 0.1763856967 0.1941176471
## 210 224 2015 0.0000000000 0.0000000000
## 211 227 2015 0.0000000000 0.0000000000
## 212 228 2015 0.0000000000 0.0000000000
## 213 231 2015 0.0002672511 0.0002941176
## 214 232 2015 0.0000000000 0.0000000000
## 215 237 2015 0.0000000000 0.0000000000
## 216 244 2015 0.0000000000 0.0000000000
## 217 245 2015 0.0000000000 0.0000000000
## 218 247 2015 0.0000000000 0.0000000000
## 219 248 2015 0.0000000000 0.0000000000
## 220 249 2015 0.0000000000 0.0000000000
## 221 250 2015 0.0000000000 0.0000000000
plot(pressure_score ~ pressure_score_old, data=old)
abline(0, 1, col="red")compare_plot <- ggplot(data = old, aes(x=pressure_score_old, y= pressure_score, label=rgn_id))+
geom_point()+
geom_abline(color="red")
plot(compare_plot)ggplotly(compare_plot)